package com.immomo.momo.android.activity;

import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.view.View;
import android.view.View.OnClickListener;

public class AboutActivity extends Activity{

	protected FlippingLoadingDialog mLoadingDialog;
	private Handler mHandler;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(com.qqskill.R.layout.activity_about);
		mLoadingDialog = new FlippingLoadingDialog(this, "请求提交中");
		mLoadingDialog.setCanceledOnTouchOutside(false);
		mHandler = new Handler();
	}

	public void checkUpdate(View v) {
		showLoadingDialog(null);
		mHandler.postDelayed(new Runnable() {
			@Override
			public void run() {
				dismissLoadingDialog();
			}
		}, 1500);
	}
	
	protected void showLoadingDialog(String text) {
		if (text != null) {
			mLoadingDialog.setText(text);
		}
		mLoadingDialog.show();
	}

	protected void dismissLoadingDialog() {
		if (mLoadingDialog.isShowing()) {
			mLoadingDialog.dismiss();
		}
	}

}
